<?php
class Netbar extends Controller {
	function Netbar(){
		parent::Controller();
		$this->load->helper(array('url','function','common'));
 		$this->load->scaffolding('mc_news');
		$this->load->library('pagination');
		//$this->load->config('afeipage');
 		//调用前台公用Model
 		$this->load->model('Mhome');
	}
	
	//根据URL取得方法名，从而显示页面http://localhost/ci/index.php/home/index/proceed[action="proceed"]
	function area(){
		load_view("area",$this->data());	
	}

	function data(){
		/*--------------------------------左侧部分【left】---------------------------------*/
		$data['lastes_news']=$this->Mhome->lastes_news($num=8);
		$data['banks']=$this->Mhome->banks();
		/*--------------------------------网站首页【index】-------------------------------*/
		$area_id=$this->uri->segment(3,0);
		$qresult=$this->Mhome->netbar_total($area_id);
		//初始化分页函数，分页三要素:base_url,total,start
		$base_url=base_url().'/index.php/netbar/area/'.$area_id.'/';
		$total=$qresult[0]->total;
		$start=$this->uri->segment(4,0);

		$data['page_html'] = pagebar($base_url,$total,14);
		$data['netbar_show']=$this->Mhome->netbar_show($area_id,$start,14);
		$data['netbar_area_name']=$this->Mhome->netbar_area_name($area_id);
		$data['flag']=NULL;
		//网吧加盟
		return $data;
	}



}//end C_proceed
/* End of file home.php */
/* Location: ./system/application/controllers/proceed.php */